package com.hp.common.exception;

import com.hp.common.base.CommonError;

import java.io.Serial;

public class BizException extends RuntimeException {
    @Serial
    private static final long serialVersionUID = 5207203111611740738L;

    /**
     * 宠物
     */
    private CommonError error;

    public BizException(CommonError error){
        super("["+error.getValue()+"]"+error.getName());
        this.error = error;
    }

    public CommonError getError() {
        return error;
    }

    public void setError(CommonError error) {
        this.error = error;
    }
}
